package com.waiting.date;

/**
 * @desctiption
 * @Author bjweitingting
 * @date 2018/5/4
 **/
public class Main {
    //calendar setTime方法中，参数不能为null，需要添加参数校验
    public static void main(String[] args) {
//        Long unix=1528473600000L;
//        Date date = new Date(unix);
//        System.out.println(date);
//        Calendar calendar = Calendar.getInstance();
//        calendar.setTime(date);
//        calendar.add(Calendar.DAY_OF_MONTH, -29);
//        System.out.println(calendar.getTime());

//        Calendar calenDarFuture = Calendar.getInstance();
//        calenDarFuture.add(Calendar.DAY_OF_MONTH, 30);
//        Calendar calendar = Calendar.getInstance();
//        calendar.set(Calendar.HOUR_OF_DAY, 0);
//        calendar.set(Calendar.MINUTE, 0);
//        calendar.set(Calendar.SECOND, 0);
//        int i=0;
//        while (calendar.compareTo(calenDarFuture) < 0) {
//            i++;
//            System.out.println(calendar.getTime());
//            calendar.add(Calendar.DAY_OF_MONTH, 1);
//        }
//        System.out.println("future"+calenDarFuture.getTime());
//        System.out.println(i);
//        Calendar calendar = Calendar.getInstance();
//        calendar.set(Calendar.HOUR_OF_DAY, 0);
//        calendar.set(Calendar.MINUTE, 0);
//        calendar.set(Calendar.SECOND, 0);
//        System.out.println(calendar.getTime());
//        for (int i = 0; i < 30; i++) {
//            calendar.add(Calendar.DAY_OF_MONTH, 1);
//        }
//        System.out.println(calendar.getTime());
        System.out.println(18/20);
    }

}
